home *** CD-ROM | disk | FTP | other *** search
- Path: thor.tu.hac.com!collins
- From: collins@thor.tu.hac.com (Ron Collins)
- Newsgroups: comp.lang.c
- Subject: Re: Prototypes
- Date: 3 Jan 1996 14:21:38 GMT
- Organization: Advanced Depot Systems
- Message-ID: <4ce3di$4j9@hacgate2.hac.com>
- References: <jason_gredley.5.30EA3371@mindlink.bc.ca>
- NNTP-Posting-Host: thor.tu.hac.com
-
- Jason Gredley (jason_gredley@mindlink.bc.ca) wrote:
- : Formerly I have been programing in C++. Recently however I thought I
- : should at least do a few programs in C, if for nothing else, ability to say
- : that I can program in C. Normally in C++ I would include appropriate header
- : files and then at any point be free to call those functions included in that
- : header file. However when compiling a C program the compiler is generating a
- : zillion _warnings_ of "call to function with no prototype". Looking at C
- : example programs, etc it seems customary to identify prototypes at the top of
- : a module as well as including header files (this seems redundant). I am even
- : getting the same warning about calling strcpy (a library function) after
- : including the "string.h" header; am I suppose to have prototypes for every
- : function I call? At present I am not bothering to have prototypes at the
- : beginning of my program modules but am including header files (my program is
- : not exhibiting problems of any sort). I want to know specifically if there
- : is any reason that I should have these prototypes in each module or at least
- : what the signifigance this has to a C program and why it has none to C++.
-
- : Thanx ... Jason
-
- The style of placing #include files at the top of a source code file is
- the same between C and C++. If you are getting a zillion warnings, then
- the problem lies elsewhere. Post a complete working snippet of code
- that generates the warnings you are talking about.
-
-
- -- Collins --
-
- -----
- The views expressed here are mine alone.
-
- Ron Collins/Hughes Aircraft Company/M20,P20/Tucson Az 85706
- rcollins@thor.tu.hac.com collins@seagull.rtd.com
- ยก----
-
-